package org.firebug.spring.boot.swagger.web.bean.voi;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.firebug.spring.boot.swagger.web.bean.core.Gender;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel
public class UserQueryVOI {
    @ApiModelProperty(name = "name", value = "姓名", required = false, dataType = "string", example = "felix")
    private String name;

    @ApiModelProperty(name = "minSalary", value = "最小薪资", required = false, dataType = "number")
    private BigDecimal minSalary;

    @ApiModelProperty(name = "maxSalary", value = "最大薪资", required = false, dataType = "number")
    private BigDecimal maxSalary;

    @ApiModelProperty(name = "gender", value = "性别", required = false, dataType = "string")
    private Gender gender;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "minBirthday", value = "最小时间", required = false, dataType = "date-time", example = "2018-01-01 00:00:00")
    private Date minBirthday;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "maxBirthday", value = "最大时间", required = false, dataType = "date-time", example = "2018-01-01 00:00:00")
    private Date maxBirthday;

    @NotNull(message = "pn required")
    @ApiModelProperty(name = "pn", value = "页码", required = true, dataType = "integer", example = "1")
    private int pn;

    @NotNull(message = "ps required")
    @ApiModelProperty(name = "ps", value = "页长", required = true, dataType = "integer", example = "10")
    private int ps;
}
